package com.zy.ems.common.error;

import com.zy.ems.common.exception.ErrorStatus;

public class SysCode extends ErrorStatus {

    protected SysCode(int code, String reasonPhrase) {
        super(code, reasonPhrase);
    }

    /**
     * 系统错误
     */
    public static final ErrorStatus sys_001 = new SysCode(10001,
            "System error");

    /**
     * 服务暂停
     */

    public static final ErrorStatus sys_002 = new SysCode(10002,
            "Service unavailable");

    /**
     * 远程服务错误
     */

    public static final ErrorStatus sys_003 = new SysCode(10003,
            "Remote service error");

    /**
     * IP限制不能请求该资源
     */

    public static final ErrorStatus sys_004 = new SysCode(10004, "IP limit");

    /**
     * 该资源需要appkey拥有授权
     */

    public static final ErrorStatus sys_005 = new SysCode(10005,
            "Permission denied,need a high level appkey");

    /**
     * 减少source
     */

    public static final ErrorStatus sys_006 = new SysCode(10006,
            "Source paramter(appkey) is missing");

    /**
     * 不支持Mediatype（%s）
     */

    public static final ErrorStatus sys_007 = new SysCode(10007,
            "Unsupport mediatype(%s)");

    /**
     * 参数错误，请参考API文档
     */

    public static final ErrorStatus sys_008 = new SysCode(10008,
            "Param error,see doc for more info");

    /**
     * 任务过多，系统繁忙
     */

    public static final ErrorStatus sys_009 = new SysCode(10009,
            "Too many pending tasks,system is busy");

    /**
     * 任务超时
     */

    public static final ErrorStatus sys_010 = new SysCode(10010, "Job expired");

    /**
     * RPC 错误
     */

    public static final ErrorStatus sys_011 = new SysCode(10011, "RPC error");

    /**
     * 非法请求
     */

    public static final ErrorStatus sys_012 = new SysCode(10012,
            "lllegal request");

    /**
     * 不合法的用户
     */

    public static final ErrorStatus sys_013 = new SysCode(10013,
            "Invalid userid");

    /**
     * 应用的接口访问权限受限
     */

    public static final ErrorStatus sys_014 = new SysCode(10014,
            "Insufficient app permissions");

    /**
     * 缺失必选参数（%s），请参考API文档
     */

    public static final ErrorStatus sys_016 = new SysCode(10016,
            "Miss required parameter(%s),see doc for more info");

    /**
     * 参数值非法，需为（ %s）,实际为（% s）， 请参考API文档
     */

    public static final ErrorStatus sys_017 = new SysCode(10017,
            "Parameter(%s)'s value invalid, expect(%s),but get(%s),see doc for more info");

    /**
     * 请求长度超过限制
     */

    public static final ErrorStatus sys_018 = new SysCode(10018,
            "Request body length over limit");

    /**
     * 接口不存在
     */

    public static final ErrorStatus sys_020 = new SysCode(10020,
            "Request api not found");

    /**
     * http method 不支持，请检查是否用post/get
     */

    public static final ErrorStatus sys_021 = new SysCode(10021,
            "HTTP method is not supported for this request");

    /**
     * 获取token失败，请检查输入参数
     */
    public static final ErrorStatus sys_22 = new SysCode(10022,
            "获取token失败，请检查输入参数");

    /**
     * 10133 缓存文件配置错误!
     */
    public static final ErrorStatus sys_23 = new SysCode(10023, "缓存文件配置错误!");

    @Override
    public int getModuleCode() {
        return ErrorModule.API_SHOP;

    }

}
